var businessLogic = require('../../../utils/NetWork/Model/MainbusinessLogic');
var common = require('../../../utils/common') 

Page({

  /**
   * 页面的初始数据
   */
  data: {
    orgid: "",
    userid: "",
    paper_concer:"",
    // text:"I don't think swiperChangeMary and Sue____before Mary"
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    common.setStorage("shouxie", []);


    var orgid = common.getStorageSync("orgid")
    var userid = common.getStorageSync("userid")
    this.setData({
      orgid: orgid,
      userid: userid,
     examid: options.examid,
     paperid: options.parid,
     remarktype: options.remarktype,
     title:options.title
    });
    // console.log(options)
    var ryid = options.parid;
    // var ryid = options.id;
    this.paper(ryid);
    wx.setNavigationBarTitle({
      title: options.biaoti//页面标题为路由参数
    })
  }, paper: function (ryid){
    let params = { "id": ryid, "userid": this.data.userid, "orgid": this.data.orgid };
    //第三步 调用接口
    businessLogic.Queryontent(params, (res) => {
      // console.log(res);
      this.setData({
        paper_concer: res
      });

    });
  }, timu: function (event){
    wx.navigateTo({
      url: "../answeron/answeron?title="+this.data.title+"&&examtype=1&&remarktype=" + this.data.remarktype+"&&parid=" + this.data.paperid+"&&examid="+this.data.examid  
      
    });
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})